﻿@model List<Video>
@{ ViewBag.Title = "Videos"; }

@if (Model.Count > 0)
{
    <p>For more details about a video, please click the video title. For videos you currently own, visit @Html.ActionLink("My Training", "Index", "My").</p>
    <table class="videos">
        <thead>
            <tr>
                <th>
                    Title
                </th>
                <th>
                    Teaser
                </th>
                <th>
                    Price
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @item.LinkToItem(Html, item.Title)
                    </td>
                    <td class="markup">
                        @Html.Raw(item.Teaser)
                    </td>
                    <td>
                        @item.PriceString()
                    </td>
                </tr>
            }
        </tbody>
    </table>
}
else
{
    <p>There are currently no videos available.</p>
}
